| Conditions | 1 |
| Paths | 1 |
| Total Lines | 28 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | /** |
||
| 17 | test.describe( 'Checkout flow', function() { |
||
| 18 | this.timeout( config.get( 'mochaTimeoutMs' ) ); |
||
| 19 | |||
| 20 | test.before( function() { |
||
| 21 | this.timeout( config.get( 'startBrowserTimeoutMs' ) ); |
||
| 22 | } ); |
||
| 23 | |||
| 24 | test.before( t.startBrowser ); |
||
| 25 | |||
| 26 | test.describe( 'One-time payment', function() { |
||
| 27 | config.get( 'stripe' ).forEach( stripeSetting => { |
||
| 28 | test.before( () => { |
||
| 29 | t.setStripeSettings( stripeSetting ); |
||
| 30 | } ); |
||
| 31 | |||
| 32 | test.beforeEach( t.asGuestCustomer ); |
||
| 33 | |||
| 34 | test.it( 'Credit card', function() { |
||
| 35 | t.openOnePaymentProduct().addToCart(); |
||
| 36 | t.payWithStripe(); |
||
| 37 | |||
| 38 | assert.eventually.ok( t.redirectedTo( '/checkout/order-received/' ) ); |
||
| 39 | } ); |
||
| 40 | } ); |
||
| 41 | } ); |
||
| 42 | |||
| 43 | test.after( t.quitBrowser ); |
||
| 44 | } ); |
||
| 45 |